function accountRemind(){
    var patt = /^\w{5,12}$/;
    var account = $.trim($("[name=loginacct]").val());
    console.log(account);
    if (!patt.test(account)){
        $("#errorAccountMessage").text("请输入5-12位账号");
    }else {
        $("#errorAccountMessage").text("");
    }
}

function usernameRemind(){
    var username = $.trim($("[name=username]").val());
    if (username == ""){
        $("#errorUsernameMessage").text("用户昵称不能为空");
    }else {
        $("#errorUsernameMessage").text("");
    }
}

function passwordRemind()
{
    var patt = /^\w+$/;
    var password = $.trim($("[name=userpswd]").val());
    if (!patt.test(password)){
        $("#errorPasswordMessage").text("请输入数字、字母、下划线组成的密码");
    }else {
        $("#errorPasswordMessage").text("");
    }

    var passwordAgain = $.trim($("[name=userpswdAgain]").val());
    if (passwordAgain != "" && password != passwordAgain){
        $("#errorPasswordMessage").text("密码不一致");
    }else {
        $("#errorPasswordAgainMessage").text("");
    }


}
function passwordAgainRemind(){
    var password = $.trim($("[name=userpswd]").val());
    var passwordAgain = $.trim($("[name=userpswdAgain]").val());
    if (password == passwordAgain){
        $("#errorPasswordAgainMessage").text("");
    }else {
        $("#errorPasswordAgainMessage").text("密码不一致");
    }
}
function emailRemind(){
    var patt = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
    var email = $.trim($("[name=email]").val());
    if (!patt.test(email)){
        $("#errorEmailMessage").text("请输入正确邮箱");
    }else {
        $("#errorEmailMessage").text("");
    }
}
function phoneNumRemind(){
    var patt = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/;
    var phoneNum = $.trim($("[name=phoneNum]").val());
    if (!patt.test(phoneNum)){
        $("#phoneNumErrorMessage").text("请输入正确手机号");
    }else {
        $("#phoneNumErrorMessage").text("");
    }
}